package com.test.qpbgboot.show.service.impl;

import com.test.qpbgboot.show.mapper.AreaMapper;
import com.test.qpbgboot.show.pojo.dto.AreaQuery;
import com.test.qpbgboot.show.pojo.vo.AreaVO;
import com.test.qpbgboot.show.service.AreaService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Slf4j
@Transactional(rollbackFor = Exception.class)
public class AreaServiceImpl implements AreaService {

    @Autowired
    private AreaMapper areaMapper;

    @Override
    public List<AreaVO> areaSelect(AreaQuery areaQuery) {
        log.debug("地区查询业务，参数:{}", areaQuery);
        List<AreaVO> areaVOList = areaMapper.selectAreaVObyAreaQuery(areaQuery);
        log.debug("地区查询结果:{}", areaVOList);
        return areaVOList;
    }
}
